CONTENTS | INDEX | PREV | NEXT
acos
facos
NAME
acos - return arc cosine of a double quantity
facos - return arc cosine of a float quantity
SYNOPSIS
#include <math.h>
double a = acos(b);
double b;
float c = facos(d);
float d;
FUNCTION
Returns the arc cosine of a floating point quantity
EXAMPLE
/*
* compile with the math library -lm
*/
#include <math.h>
#include <stdio.h>
main()
{
{
double a = acos(0.25);
printf("acos 0.25 = %lfn", a); /* 1.318 */
}
{ /* less accuracy */
float a = facos(0.25);
printf("acos 0.25 = %lfn", (double)a);
}
return(0);
}
INPUTS
double b; double floating point value
float d; float floating point value
RESULTS
double a; result double floating point value
float c; result float floating point value